Skip to content

Show next line when first line was empty #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Show next line when first line was empty #522

wants to merge 1 commit into from

Conversation

Aimeast
Copy link
Contributor

@Aimeast Aimeast commented Sep 28, 2013

No description provided.

@dahlbyk
Copy link
Member

dahlbyk commented Sep 28, 2013

  1. Could you use StringSplitOptions.RemoveEmptyEntries here?
  2. Test coverage?

@nulltoken
Copy link
Member

@Aimeast Thanks for this.

Some questions though:

  • How (which with tool) did you create with an empty first line the first time?
  • Is this commit visible on a public repository?
  • How does git.git commands (git log, git blame, ..) behave regarding this empty first line?

@Aimeast
Copy link
Contributor Author

Aimeast commented Sep 29, 2013

@dahlbyk

Could you use StringSplitOptions.RemoveEmptyEntries here?

Maybe I think this is a bug from libgit2, not in libgit2sharp.

Test coverage?

I can't write the test case, because I can't create a commit with empty first line thought LibGit2Sharp

@nulltoken

How (which with tool) did you create with an empty first line the first time?

  • I am trying but failed to create a commit with empty first line throught git bash and LibGit2Sharp
  • Some repositories convert from svn will be that. command git svn clone xxxx

Is this commit visible on a public repository?

I really have one, but I can't public it right now. Sorry.

How does git.git commands (git log, git blame, ..) behave regarding this empty first line?

I am using git bash and git gui, not only skip leading empty lines in ShortMessage, but also skip leading empty lines in Message

@Aimeast
Copy link
Contributor Author

Aimeast commented Sep 29, 2013

@nulltoken I got a case

  1. please clone this repository and reference to branch issue522
  2. use libgit2sharp with code var commit = repo.Lookup<Commit>("e617b22")
  3. please watch the properties Message and MessageShort

https://github.com/Aimeast/TestForFirst/tree/issue522

@nulltoken
Copy link
Member

With bf3bbbc, Libgit2 git_commit_message() now takes care of stripping out the leading newlines.

@nulltoken nulltoken closed this Oct 5, 2013
@Aimeast Aimeast deleted the patch-AE-1-MessageShort branch October 7, 2013 10:26
phatblat pushed a commit to phatblat/libgit2 that referenced this pull request Sep 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants